<%@ Page Language="VB" MasterPageFile="~/Admin/Admin.master" MaintainScrollPositionOnPostback="true" AutoEventWireup="false" CodeFile="alertsSettings.aspx.vb" Inherits="admin_alertsSettings" title="Admin - Alert Settings" %>
<%@ Register Assembly="InputControls" Namespace="InputControls" TagPrefix="cc2" %>
<%@ Register Src="SubNavControls/AlertSubNavControl.ascx" TagName="AlertSubNavControl" TagPrefix="uc1" %>

 <asp:Content ID="Content1" runat="server" ContentPlaceHolderID="ContentPlaceHolder2">
<uc1:AlertSubNavControl ID="AlertSubNavCtrl" runat="server"/>

 <asp:ObjectDataSource ID="AlertsObjectDataSource" runat="server"
        DeleteMethod="RemoveInstance" InsertMethod="SaveInstance" SelectMethod="ListBySort"
        TypeName="Cdm.DataCore.CaseNotes.Alert" DataObjectTypeName="Cdm.DataCore.CaseNotes.Alert"
        UpdateMethod="UpdateInstance" SortParameterName="sortExpr" >
    </asp:ObjectDataSource>
        
    <asp:ObjectDataSource ID="AlertEditObjectDataSource" runat="server"
        DeleteMethod="RemoveInstance" InsertMethod="SaveInstance" SelectMethod="ListByAlertid"
        TypeName="Cdm.DataCore.Admin.AlertSettings" DataObjectTypeName="Cdm.DataCore.Admin.AlertSettings"
        UpdateMethod="UpdateInstance" >
        <SelectParameters>
            <asp:ControlParameter ControlID="AlertsScrollingGridView" Name="AlertId" Type="int32" />
        </SelectParameters>
    </asp:ObjectDataSource>

<table cellpadding="0" cellspacing="0">
<tr><td style="width:20px;" rowspan="2"></td><td><h1><a id="pagecontent">Admin - Alert Settings</a></h1></td></tr>
<tr><td><cc2:ScrollingGridView ID="AlertsScrollingGridView" runat="server" CssClass="gridOffset" AutoGenerateColumns="False" ToolTip="170"
            DataSourceID="AlertsObjectDataSource" IsFixedColumn="true" DataKeyNames="Id" CellPadding="5" BorderColor="#21334B"  Caption="Define Alerts and who will receive them." CaptionAlign="Top"
                BorderStyle="Solid" GridLines="Vertical" Visible="true" EmptyDataText="No data" AllowSorting="true">
        <HeaderStyle  CssClass="adminHeaderStyle" BackColor="#C3CAD4" BorderColor="#21334B" VerticalAlign="Top" />
        <RowStyle CssClass="adminColumnStyle" />
        <Columns>
            <asp:BoundField DataField="AlertSubject" SortExpression="AlertSubject" HeaderText="Subject" ItemStyle-Width="224px" HeaderStyle-Width="240px" Readonly="True"/>
            <asp:BoundField DataField="AlertText" SortExpression="AlertText" HeaderText="Long Text" ItemStyle-Width="310px" HeaderStyle-Width="310px" />
            <asp:CommandField ShowEditButton="True" HeaderText="Action"  AccessibleHeaderText="Action">
                <ItemStyle HorizontalAlign="Center" Width="75px" />
                <HeaderStyle Width="75px" />
            </asp:CommandField>
            <asp:CommandField DeleteText="Settings..." ShowDeleteButton="True" HeaderText="Settings" ItemStyle-Width="75px" HeaderStyle-Width="75px" AccessibleHeaderText="Settings" />
            <asp:HyperLinkField NavigateUrl="~/admin/PermissionsByType.aspx?PermissionType=Alert" Text="Edit Recipient List" HeaderText="Link" AccessibleHeaderText="Link">
                <ItemStyle HorizontalAlign="Center" Width="155px"/>
                <HeaderStyle Width="185px" />
            </asp:HyperLinkField>
        </Columns>
        <AlternatingRowStyle BackColor="#E8ECF4" />
        </cc2:ScrollingGridView></td></tr>
</table>

<table><tr><td style="width:20px;" rowspan="2"></td>
<td><cc2:ScrollingGridView ID="CriticalLevelsScrollingGridView" runat="server" CssClass="gridOffset" AutoGenerateColumns="False" 
                DataSourceID="AlertEditObjectDataSource" CellPadding="5" BorderColor="#21334B" Caption="Editing Alert Settings" CaptionAlign="Top"
                    BorderStyle="Solid" GridLines="Vertical" Visible="false" DataKeyNames="AlertSettingId" Width="475px">
                <HeaderStyle  CssClass="headerStyle" BackColor="#C3CAD4" BorderColor="#21334B" VerticalAlign="Top" />
                <RowStyle CssClass="columnStyle" />
                <Columns>
                    <asp:TemplateField HeaderText="Critical Level">
                        <ItemStyle Width="100px" />
                        <HeaderStyle Width="105px" />
                        <ItemTemplate><%#Eval("CriticalLevel")%></ItemTemplate>
                    </asp:TemplateField>
                    <asp:TemplateField HeaderText="Value">
                        <ItemStyle Width="100px" />
                        <HeaderStyle Width="100px" />
                        <ItemTemplate><%#Eval("Number") %></ItemTemplate>
                        <EditItemTemplate>
                            <asp:TextBox ID="txtValue" Runat="Server" Width="70px" Text='<%# Bind("Number") %>' />
                        </EditItemTemplate>
                    </asp:TemplateField>
                    <asp:TemplateField HeaderText="">
                        <ItemStyle Width="160px" />
                        <HeaderStyle Width="160px" />
                        <ItemTemplate><%#Eval("Units")%></ItemTemplate>
                    </asp:TemplateField>
                    <asp:CommandField EditText="Edit" ShowEditButton="True" ItemStyle-Width="120px" HeaderStyle-Width="125px"   HeaderText="Action" AccessibleHeaderText="Action" />
                    
                </Columns>
                <AlternatingRowStyle BackColor="#E8ECF4" /></cc2:ScrollingGridView></td></tr>
                <tr><td style="text-align:center;"><asp:Button ID="CancelButton" runat="server" Text="Return to Alerts List" Visible="false" /></td></tr></table>
    
    
    
            
            
</asp:Content>

